package com.rescue.forum.entity;

import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.io.Serializable;
import java.time.LocalDateTime;

@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
/**
 * 用户积分记录表
 * @TableName user_integral_record
 */
public class UserIntegralRecord implements Serializable {
    public static final Integer ARTICLE = 2;
    public static final Integer COMMENT = 1;
    public static final Integer DOWNLOAD = 0;
    public static final String TYPE_DOWNLOAD = "下载";
    public static final String TYPE_ARTICLE = "发帖";
    public static final String TYPE_COMMENT = "评论";
    private static final long serialVersionUID = 1L;
    /**
     * 记录ID
     */
    @NotNull(message = "[记录ID]不能为空")
    @ApiModelProperty("记录ID")
    private Integer recordId;
    /**
     * 用户ID
     */
    @Size(max = 15, message = "编码长度不能超过15")
    @ApiModelProperty("用户ID")
    private Integer userId;
    /**
     * 操作类型
     */
    @ApiModelProperty("操作类型")
    private Integer operType;
    /**
     * 积分
     */
    @ApiModelProperty("积分")
    private Integer integral;
    /**
     * 创建时间
     */
    @ApiModelProperty("创建时间")
    private LocalDateTime createTime;
    /**
     * 操作类型名称
     */
    @Size(max = 50, message = "编码长度不能超过50")
    @ApiModelProperty("操作类型名称")
    private String operTypeName;
}
